package com.dong.filter;

import javax.servlet.*;
import java.io.IOException;

public class CharacterEncoding implements Filter {
    public void init(FilterConfig filterConfig) throws ServletException {

    }

    public void doFilter(ServletRequest Request, ServletResponse Response, FilterChain Chain) throws IOException, ServletException {
        Request.setCharacterEncoding("utf-8");
        Response.setCharacterEncoding("utf-8");
        Chain.doFilter(Request,Response);
    }

    public void destroy() {

    }
}
